<?php
namespace App\Http\Service\OnlineTeam;


use App\Http\Service\Basic\BasicService;
use Config;

class TeamService extends BasicService
{

    //构造函数
    function __construct()
    {
        parent::__construct();
    }


    //获取客服列表
    public function getOnlineTeamList()
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.getonlinelist'), 'get');
    }

    //  更新客服的状态
    public function OnlineTeamUpdate($where)
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineupdate'),$where, 'get');
    }

    //  更新客服张号信息
    public function onlineTeamUpdateUserInfo($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineupdateAaccount'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineupdateAaccount'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }


    //  删除客服信息
    public function OnlineTeamDelete($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineAaccountdelete'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineAaccountdelete'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }


    /**
     * @param $where
     * @return bool|mixed|null|string
     * 添加客服
     */
    public function OnlineTeamAdd($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineAaccountadd'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineAaccountadd'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    /**
     * 客服数据列表
     */
    public function getOnlineTeamDataList($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineteamdatalist'),$where,'get');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineteamdatalist'),$where,'get');
    }

    /**
     * @param $where
     * @return bool|mixed|null|string
     * 客服数据详情
     */
    public function getOnlineTeamInfo($where)
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.onlineteamuserinfo'),$where,'get');
    }

    /**
     * 管理员提交审核
     */
    public function submitAudit($where)
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.submitaudit'),$where,'get');
    }

    /**
     * @param $where
     * @return bool|mixed|null|string
     * 客服提交审核
     */
    public function AddAudit($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.addaudit'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.addaudit'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    /**
     * 客服数据删除
     */
    public function AuditDelete($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.auditdelete'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.auditdelete'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    
}